Computer graphics display systems are commonly used for displaying graphical representations of objects on a two-dimensional video display screen. Current computer graphics display systems provide highly detailed representations and are used in a variety of applications. A computer graphics display system generally comprises a central processing unit (CPU), system memory, a video display screen and graphics hardware, such as a geometry accelerator and/or a rasterizer. The graphics hardware communicates with the host processor via an I/O bus, such as, for example, a PCI bus, and causes an object to be rendered on the video display screen. The graphics hardware components are allocated addresses on the I/O bus. Data sent from the host CPU along the I/O bus is sent to the particular I/O device designated by the address contained in the data. Generally, the address also specifies an address within the particular I/O device to which the data has been sent.
In computer graphics display systems, an object to be presented on the display screen usually is broken down into graphics primitives. Primitives are basic components of a graphics display and may include points, lines, vectors and polygons (e.g., triangles and quadrilaterals). Typically, a hardware/software scheme is implemented to render, or draw, the graphics primitives that represent a view of one or more objects being represented on the display screen. The host CPU defines the primitive in terms of the X, Y and Z coordinates of its vertices, the normals of the vertices, N.sub.x, N.sub.y and N.sub.z, the red, green, blue and alpha (R, G, B and .alpha.) color values of the vertices, and the texture values S, T, R and Q for the vertices. Alpha is a transparency value. Additional primitive data may be used in specific applications.
An Application Program Interface, or API, is the software interface between the host CPU and the rendering hardware. An API processes the data from the CPU and provides the processed data to the graphics hardware located downstream, which further processes the data into an image to be displayed on the display screen. The graphics hardware interpolates the primitive data to compute the display screen pixels that represent each primitive and the R, G, B and .alpha. values for each pixel.
Generally, the data processed by the host CPU in accordance with the API is coalesced in a command data (CD) buffer located in the I/O interface before being sent to the graphics hardware. Coalescing involves sending data in "bursts" with only the address of the first piece of data in a string of sequential data being designated. A counter increments the address of the first piece of data to determine the addresses of the succeeding data. By using coalescing, less data is required to be processed by the host CPU and sent to the I/O interface. Once the commands and data have been coalesced in the CD buffer, the data is sent to addresses in the graphics hardware which are designated by the commands stored in the CD buffer.
In order for the graphics hardware to properly process data, the data must be received by the graphics hardware in a predetermined order. Some APIs organize data to be sent downstream to the graphics hardware in a manner which is inconsistent with the order in which the graphics hardware must receive it. Examples of APIs include OpenGL, Starbase and PEX. When Starbase or PEX is used as the API, for example, vertex data is sent to the geometry accelerator with the X, Y and Z coordinates first whereas many geometry accelerators must see the X, Y and Z coordinates last. Therefore, in order for coalescing to be utilized; the data must be rearranged into the order in which it must be received by the graphics hardware. One known way of addressing this problem is to utilize a software program in conjunction with the API which converts the data into a form which is suitable for use by the graphics hardware. However, this solution presents the host CPU with a substantial increase in the amount of data which must be processed by it and, therefore, results in a substantial performance penalty to the computer graphics display system in terms of decreased throughput.
Another way of addressing the problem of providing coalescing for multiple APIs is to implement a large amount of address space for each API in order to accommodate the different vertex data formats. However, this solution requires additional address space and logic to be implemented for each of the different API vertex data formats, which is neither desirable nor practical. Furthermore, this solution is even less desirable in view of the growing number of APIs.
Accordingly, a need exists for a method and apparatus which allows a computer graphics display system to efficiently implement any API and which allows the advantages of coalescing to be realized, thus maximizing performance and efficiency.